export const flowableToFormEngine = (schema: any) => {
  let arr = schema?.fields || [];
  let obj = {
    type: 'object',
    properties: {},
  };
  if (arr[0]) {
    obj = {
      type: 'object',
      column: arr[0]?.params?.column,
      displayType: arr[0].params.displayType,
      labelWidth: arr[0].params.labelWidth,
      properties: {},
    };
  }
  for (let i = 0; i < arr.length; i++) {
    const item = arr[i];
    obj.properties[item.id] = item.params;
  }
  return obj;
};
